import request from '@/utils/request'

const api = {
  consumerQuery: '/consumer/query',
  editConsumerStatus: '/consumer/modify/status'
}

/**
 * consumerQuery func
 * parameter: {
 *     pageNum: '',
 *     pageSize: '',
 *     userKeyword: '',
 *     contactKeyword: '',
 *     status：'',
 *     startLastLoginTime:'',
 *     endLastLoginTime:''
 * }
 * @param parameter
 * @returns {*}
 */
export function getConsumerList (parameter) {
  return request({
    url: api.consumerQuery,
    method: 'post',
    data: parameter
  })
}

/**
* editConsumerStatus func
* parameter: {
*    status:'',
*    freezingReason:'',
*    account:''
* }
* @param parameter
* @returns {*}
*/
export function editConsumerStatus (parameter) {
  return request({
    url: api.editConsumerStatus,
    method: 'post',
    data: parameter
  })
}
